package com.listener.service;

import org.hibernate.event.spi.*;
import org.hibernate.persister.entity.EntityPersister;

public class MyLoadListener implements PostInsertEventListener, PostDeleteEventListener, PostLoadEventListener, PostUpdateEventListener {

    @Override
    public void onPostInsert(PostInsertEvent event) {
        System.out.println("===============onPostInsert==================");
    }
    @Override
    public void onPostDelete(PostDeleteEvent event) {
        System.out.println("===============onPostInsert==================");

    }
    @Override
    public void onPostUpdate(PostUpdateEvent event) {
        System.out.println("===============onPostDelete==================");

    }
    @Override
    public boolean requiresPostCommitHanding(EntityPersister persister) {
        System.out.println("=============requiresPostCommitHanding====================");
        return false;
    }

    @Override
    public void onPostLoad(PostLoadEvent event) {

        System.out.println("=============onPostLoad====================");
    }
}


